#include <iostream>
#include <string>
#include <map>

typedef int *(*SEL_CREATE_FUNC)(void *param);

class AIFactory
{
  private:
    /* data */
    AIFactory(/* args */);
    ~AIFactory();

    std::map<std::string, SEL_CREATE_FUNC> _classMaps;

  public:
    void add(std::string &classname, SEL_CREATE_FUNC func);

    int *getObject(std::string &classname, void *param);
};

AIFactory::AIFactory(/* args */)
{
}

AIFactory::~AIFactory()
{
}

void AIFactory::add(std::string &classname, SEL_CREATE_FUNC func)
{
    _classMaps[classname] = func;
}

int *AIFactory::getObject(std::string &classname, void *param)
{
    return _classMaps[classname](param);
}
